package Day2;

public class Player {
	String identity; //身份
	String camp; //阵营（结算胜利条件）
	String name; //姓名
	int skills; //技能
	int state; //状态 0 活着 1普通死亡 2毒死 （猎人一旦被毒死，是不能发动技能的）
	
	
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public String getIdentity() {
		return identity;
	}
	//自定义个性化的getset方法
	public void setIdentity(String identity) {
		//分配身份 自动分配阵营 自动分配技能
		this.identity = identity;
		switch (identity) {
		case "预言家":
			this.skills=1; //预言家的技能
			this.camp="神"; //分配到神阵营
			break;
		case "女巫":
			this.skills=2;
			this.camp="神";
			break;
		case "猎人":
			this.skills=3;
			this.camp="神";
			break;
		case "白痴":
			this.skills=4;
			this.camp="神";
			break;
		case "狼人":
			this.skills=-1;
			this.camp="狼";
			break;
		case "平民":
			this.skills=0;
			this.camp="民";
			break;
		}
	}
	public String getCamp() {
		return camp;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getSkills() {
		return skills;
	}
	@Override
	public String toString() {
		return "Player [identity=" + identity + ", camp=" + camp + ", name=" + name + ", skills=" + skills + ", state="
				+ state + "]";
	}

	
	
}

